define(function(require){
	var $=require("jq");
	var Dialog=require("/pinzhiV2.0/js/pz_use_dialog.js");
	$("#receiveGuide").click(function(){
		$.post("/vipCenter/guidePoints/receiveGuide.do",function(data){
			var ret =data.ret;
			if(ret == -2){
				var tips=new Dialog({
					type:"alert",
					text:"提示",
					tipsText:data.msg,
					callBack:function(){
						window.location.href = "/login.do?toUrl=/vipCenter/guidePoints/guidePointsForm.do";  
					},
					mask:0.3
				});
				return;
			}else{
				var tips=new Dialog({
					type:"alert",
					text:"提示",
					tipsText:data.msg,
					callBack:function(){
						window.location.href = "/vipCenter/guidePoints/guidePointsForm.do";  
					},
					mask:0.3
				});
				return;
			}
		},"json");
	});
});